The present invention relates to an escape run-level coder for use in a digital video signal processing apparatus that compresses and transmits bit streams conforming to, for example, syntax like that of H.261 (see "Recommendation H.261--Video Coder for Audiovisual Services at px64 kbit/s" by International Telegraph and Telephone Consultative Committee, Study Group XV, CCITT Subgroup XV Document, Report R 37, August 1990) and MPEG-1 (see "CD 11172--Coding of Moving Pictures and Associated Audio for Digital Storage Media at up to about 1.5 Mbps" by International Organization for Standardization, ISO MPEG Document, ISO-IEC/JTC1/SC2/WG8, 1992). 2. Description of the Prior Art
In a prior art digital video signal processing apparatus, a lossy coding algorithm based on the discrete cosine transform (DCT) precedes a lossless encoder based on variable length coding (VLC). The transform coefficients are run-level and entropy coded, in which the most common run-level combinations are given the shortest codes and the less common combinations longer codes. The least commonly occurring codes are not given special codes, but are coded as fixed length data. For example, in H.261 infrequent combinations are coded as a 6 bit escape sequence, 6 bits representing the run length, and 8 bits representing the level. The total is a 20 bit fixed length code. MPEG-1 is similar with the exception that the level is represented in either 8 or 16 bits. In both H.261 and MPEG-1 the escape prefix is a fixed length bit sequence which does not very. No prior art exists for an escape coder which has a programmable escape prefix capability.
A versatile code must support existing standards (such as H.261 and MPEG-1) as well as any expected new standards or perceived extensions to the existing standards, such as the Matsushita Proposal for MPEG-2 (see "Matsushita Proposal Description for MPEG-II", by International Organization for Standardization, ISO/IEC-JTC1/SC29/WGll, MPEG91/217, 1991). The following problems need to be solved by the versatile escape run-level coder:
1. In a versatile escape run-level coder, the escape prefix bit sequence must be programmable. For example, the Matsushita Proposal for MPEG-2 supports three different prefix bit sequences all of different lengths. An object of this invention is to support a programmable escape prefix bit sequence. PA1 2. The escape run-level coder must be able to handle high rate of data throughput. For example, for 4:1:1 sampled wide television, the pixel rate is about 27 MHz. The escape run-level coder must be able to code (but not be limited to) run-level combinations at this rate. An object of this invention is to encode escape codes with minimum delay. PA1 3. The implementation must be cost effective. Concatenating several bit sequences of variable length together typically requires the use of a shifter, but shifters capable of the high rate data throughput are costly. An object of this invention is to encode escape codes without using a fast shifter because it is expensive.